home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xcmd / xrulesde.sit / Xrules™ Tutorial / card_17447.txt < prev    next >
Encoding:
Text File  |  1991-06-24  |  2.1 KB  |  59 lines

  1. -- card: 17447 from stack: in
  2. -- bmap block id: 19648
  3. -- flags: 4000
  4. -- background id: 7050
  5. -- name: operands
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 01
  10. -- high flags: 0007
  11. -- rect: left=2 top=26 right=314 bottom=511
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 22
  16. -- text size: 10
  17. -- style flags: 0
  18. -- line height: 13
  19. -- part name: doc
  20.  
  21.  
  22. -- part contents for card part 1
  23. ----- text -----
  24. The BNF for operands is as follows:
  25.  
  26.     operand  :=  [#]FACT fact_id |
  27.                  global_id |
  28.                  real_number |
  29.                  integer |
  30.                  boolean |
  31.                  quoted_string |
  32.                  simple_string  |
  33.                  "?" | ? | "*" | * | ""
  34.  
  35. Operands are evaluated as follows:
  36.  
  37.   [#]FACT fact_id        -- a fact. ex. FACT "fact 1". If the immediate
  38.                          --   operator (#) is used, the fact will be 
  39.                          --   used as is. In other words, the 
  40.                          --   inference engine will not try to find 
  41.                          --   a value for a fact that is not asserted 
  42.                          --   when evaluating the clause.
  43.   global_id              -- the value of a global (must have 
  44.                          --   been declared global)
  45.   real_number            -- a real number. ex. 1.5
  46.   integer                -- an integer number. ex. 11
  47.   boolean                -- either TRUE or FALSE
  48.   quoted_string          -- a quoted string. ex. "this is a string"
  49.   simple_string          -- a simple string. ex. string1 (no spaces allowed)
  50.   "?" or ?               -- "unknown" if applied to a fact (fact will evaluate
  51.                          --   false unless compared equal to unknown).
  52.                          --   Otherwise, considered a string.
  53.   "*" or *               -- "don't care" if applied to a fact or compared
  54.                          --   to a fact (fact will always evaluate true).
  55.                          --   Otherwise, considered a string.
  56.   ""                     -- "not asserted" if applied to a fact. Otherwise,
  57.                          --    considered a null string.
  58.  
  59.